#!/bin/bash

export TBOX_BUILD_TOP_DIR=$(readlink -f $(dirname $0))
echo "top dir:$TBOX_BUILD_TOP_DIR"

rm -rf ./build
mkdir build
# cp ./etc/tmpConfig.txt build
cd build

cmake -DBUILD_GTEST=ON ..
make -j8
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${TBOX_BUILD_TOP_DIR}/3rdparty/dds/lib/x86_linux/
./gtest/collect_gtest --gtest_output="xml:gtest_report.xml"
# cmake --build . --target lcov

echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${TBOX_BUILD_TOP_DIR}/3rdparty/dds/lib/x86_linux/"



